﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class aspnet_admin_WebHTMLEditor : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //添加样式
            HtmlEdirotTarea.Attributes.Add("style", "width:" + width + ";height:" + height + ";visibility:hidden;");

        }
    }

    /// <summary>
    /// html
    /// </summary>
    private string _Html = string.Empty;

    /// <summary>
    /// 将替换' 为&#39;
    /// </summary>
    public string Html
    {
        get { return Request.Form[HtmlEdirotTarea.Name].Trim().Replace("'","&#39;"); }
        set
        {
            HtmlEdirotTarea.InnerHtml = value.Replace("<", "&lt;").Replace(">", "&gt;");

        }
    }



    private string _height = "500px";
    /// <summary>
    /// 高度
    /// </summary>
    public string height
    {
        get { return _height; }
        set { _height = value; }
    }


    private string _width = "500px";
    /// <summary>
    /// 宽度
    /// </summary>
    public string width
    {
        get { return _width; }
        set { _width = value; }
    }
}